import request from '@/utils/request'

// 查询耗材信息列表
export const listConsumable = (query) => {
  return request({
    url: '/project/consumable/list',
    method: 'get',
    params: query
  })
}

// 查询耗材信息详细
export const getConsumable = (consumableId) => {
  return request({
    url: '/project/consumable/' + consumableId,
    method: 'get'
  })
}

// 新增耗材信息
export const addConsumable = (data) => {
  return request({
    url: '/project/consumable',
    method: 'post',
    data: data
  })
}

// 修改耗材信息
export const updateConsumable = (data) => {
  return request({
    url: '/project/consumable',
    method: 'put',
    data: data
  })
}

// 删除耗材信息
export const delConsumable = (consumableId) => {
  return request({
    url: '/project/consumable/' + consumableId,
    method: 'delete'
  })
}

// 查询产品下拉树结构
export function produceTreeSelect() {
  return request({
    url: '/project/produce/produceTree',
    method: 'get'
  })
}
